import { defineStore } from 'pinia'
 

export const useThemeStore = defineStore('themePath', {
    // persist: {
    //     enabled: true, // 开启数据缓存
    //     strategies: [
    //       {
    //         key: 'mytheme',
    //         storage: localStorage // 默认是sessionStorage
    //       }
    //     ],
    // },
    state: () => ({
        theme: '', 
        themeData: {}, 
        themeUrl: 'http://183.221.0.153:35003/my/',//地址
        lastUrl: '',//地址
    }),
    actions: {
        setTheme(data) {
            this.theme = data
        },
        setThemeData(data) {
            this.themeData = data
        },
        setThemeUrl(data) {
            this.themeUrl = data
        },
        setLastUrl(data) {
            this.lastUrl = data
        }, 
    }
})